<template>
	<!-- 已接单/已完成组件 -->
	<view class="completed">
		<view v-for="(item,index) in orderList" :key="index" @tap="inOrderDetail(item.id)">
			<view class="addressibfo-header">
				<view class="recycler">回收员</view>
				<view class="hsyInfo">
					<text class="name">{{item.collectorName}}</text>
					<text class="hsyPhone">{{item.collectorPhone}}</text>
				</view>
				<view class="right">
					<view class="phone">呼叫</view>
				</view>
			</view>
			<view class="addressinfo">
					<view class="address-text">
						<view class="addressinfo-title">上门地址</view>
						<view class="text">{{item.location}}{{item.detail}}</view>
					</view>
				<view class="icon iconfont icon-xiangyoujiantou"></view>
			</view>
			<view class="addressText-coins" v-if="tabbarIndex==3">
				<view class="coins-title">回收币</view>
				<view class="coins">{{item.total}}</view>
			</view>
			<view class="orderBianhao">
				<view class="orderBianhao-left">
					<view class="logno">订单编号：{{item.logno}}</view>
					<view class="orderimg">
						<!-- <image :src="item.pic_url" mode="aspectFill"></image> -->
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			orderList:Array,
			tabbarIndex:String
		},
		data(){
			return {
				
			}
		},
		methods:{
			inOrderDetail(value){//点击进入订单详情
				var orderType = "已完成"
				uni.navigateTo({
					url:`/otherPages/orderDetail/orderDetail?orderListId=${value}&orderType=${orderType}`
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.completed {
		.addressibfo-header{
			font-size: 26rpx;
			color: #fff;
			margin-top: 20rpx;
			padding: 20rpx;
			box-sizing: border-box;
			border-radius: 20rpx 20rpx 0 0;
			display: flex;
			justify-content: space-between;
			background: #00b388;
			.recycler{
				width: 120rpx;
			}
			.hsyInfo{
				.name{
					margin-right: 10rpx;
				}
			}
			.right{
				margin-left: auto;
				.phone{
					width: 100rpx;
					height: 50rpx;
					line-height: 50rpx;
					text-align: center;
					color: #00b388;
					background: #f7f7f7;
					border-radius: 10rpx;
				}
			}
		}
		.addressinfo {
			background: #fff;
			padding: 20rpx;
			// margin-top: 20rpx;
			// border-radius: 20rpx 20rpx 0 0;
			
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: space-between;
			
			.address-text {
				display: flex;
				width: 80%;
	
				.addressinfo-title {
					width: 120rpx;
					font-size: 25rpx;
					color: #6c6c6c;
					// border: 1px solid #4fc3a5;
				}
	
				.text {
					font-size: 28rpx;
					margin-left: 20rpx;
				}
				
			}
			
	
			.icon-xiangyoujiantou {
				// flex:1;
				margin-left: auto;
			}
		}
		.addressText-coins{
			display: flex;
			background: #fff;
			padding: 20rpx;
			box-sizing: border-box;
			border-bottom: 2rpx solid #f0f0f0;
			// margin-top: 20rpx;
			.coins-title{
				width: 120rpx;
				font-size: 25rpx;
				color: #6c6c6c;
			}
			.coins{
				color: #ffc506;
				font-weight: bold;
			}
		}
		.orderBianhao {
			background: #fff;
			padding: 20rpx;
			border-radius: 0 0 20rpx 20rpx;
			box-sizing: border-box;
			display: flex;
			align-items: center;
		}
		
		.orderBianhao-left {
			.logno {
				color: #9e9e9e;
				font-size: 25rpx;
			}
		
			.orderimg {
				width: 200rpx;
				height: 100rpx;
				margin-top: 20rpx;
		
				// border: 1px solid #000;
				image {
					width: 100%;
					height: 100%;
				}
			}
		}
		
		.orderBianhao-right {
			margin-left: auto;
		
			.clance {
				width: 130rpx;
				height: 60rpx;
				line-height: 60rpx;
				text-align: center;
				background: #f7f7f7;
				border-radius: 10rpx;
				color: #e14330;
				font-size: 25rpx;
				font-weight: bold;
			}
		}
	}
</style>